package com.whately.core.database.db;

import lombok.extern.slf4j.Slf4j;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

@Slf4j
public class DynamicRoutingDataSource extends AbstractRoutingDataSource {
    @Override
    protected Object determineCurrentLookupKey() {
        //log.info("current data source ：{}", DynamicDataSourceContextHolder.get());
        Object obj = DynamicDataSourceContextHolder.get();
        return obj;
    }
}
